import request from '@/api/request.js'
import request2 from './requset2'

//密码登录
export const GetUserLogin = (params) => {
    return request.post('/app/login', params)
}

//手机号登录(发送验证码)
export const GetCodeLogin = (params) => {
    return request2.get(`/captcha/sent?phone=${params.phone}`)
}
//验证验证码
export const UserVerifyCode = (params) => {
    return request2.get(`/captcha/verify?phone=${params.phone}&captcha=${params.captcha}`)
}

//查找用户信息
export const FindUserInfo = (params) => {
    return request.post('/app/finduser', params)
}

//注册用户
export const UserReg = (params) => {
    return request.post('/app/register', params)
}

//获取用户信息
export const GetUserInfo = () => {
    return request.get('/app/getuserinfo')
}

//获取我的游记信息
export const GetMyTravels = () => {
    return request.post('/app/getmytravels')
}

//上传头像
export const UpMyHead = (params) => {
    return request.post('/app/uplodafile', params)
}

//修改用户头像
export const ChangeUseHead = (params) => {
    return request.post('/app/changeuserinfo', params)
}

//获取喜欢列表
export const GetUserLikeList = (params) => {
    return request.post('/app/getlikelist', params)
}

//获取收藏列表
export const GetCollectList = (params) => {
    return request.post('/app/getcollectlist', params)
}